import request from '@/utils/request'

// 查询云仓销售列表
export function listSales(query) {
  return request({
    url: '/cw/sales/list',
    method: 'get',
    params: query
  })
}

// 查询云仓销售详细
export function getSales(serialNum) {
  return request({
    url: '/cw/sales/' + serialNum,
    method: 'get'
  })
}

// 新增云仓销售
export function addSales(data) {
  return request({
    url: '/cw/sales',
    method: 'post',
    data: data
  })
}

// 修改云仓销售
export function updateSales(data) {
  return request({
    url: '/cw/sales',
    method: 'put',
    data: data
  })
}

// 删除云仓销售
export function delSales(serialNum) {
  return request({
    url: '/cw/sales/' + serialNum,
    method: 'delete'
  })
}
// 同步
export function cwSalesSync() {
  return request({
    url: '/cw/sales/sync',
    method: 'get'
  })
}
